﻿using System;
using System.Configuration;

namespace Sustainalytics.ProductInvolvement.Tasks
{
    public static class HostConfig
    {
        public static string GetHostUrl()
        {
            string url = ConfigurationManager.AppSettings["productInvolvementUrl"];
#if !DEBUG
            var uriBuilder = new UriBuilder(url);
            uriBuilder.Scheme = Uri.UriSchemeHttps;
            uriBuilder.Port = Int32.Parse(ConfigurationManager.AppSettings["httpsPort"]);
            url = uriBuilder.Uri.ToString();
#endif
            return url;
        }

        public static string GetReportResource()
        {
            string resource = ConfigurationManager.AppSettings["productInvolvementReportResourceUrl"];

            return resource;
        }
    }
}
